package com.xxx.video.mine.adapters;

import android.view.View;
import android.widget.TextView;


import com.xxx.video.R;
import com.xxx.video.commen.views.TagAdapter;
import com.xxx.video.mine.beans.SearchHotWordListBean;

import java.util.List;

import butterknife.BindView;

public class SearchHotWordListAdapter extends TagAdapter<SearchHotWordListBean.ListBean> {

    @BindView(R.id.tv_item_search_hot_word_tag_name)
    TextView tvItemSearchHotWordTagName;

    public SearchHotWordListAdapter(List<SearchHotWordListBean.ListBean> data) {
        super(data);
    }

    @Override
    protected void initData2View(int position, View view) {
        SearchHotWordListBean.ListBean listBean = getItemData(position);
        tvItemSearchHotWordTagName.setText(listBean.fKeyword);
        tvItemSearchHotWordTagName.setOnClickListener(v -> {
            if (onItemClickListener != null) {
                onItemClickListener.onItemClick(listBean, position, 0);
            }
        });
    }

    @Override
    protected int getItemLayout() {
        return R.layout.item_search_hot_word_list;
    }
}
